<template>
  <router-view></router-view>
</template>

<style lang="scss">
// 第三方插件css
@import "~bootstrap-vue/dist/bootstrap-vue.css";
@import "~perfect-scrollbar/css/perfect-scrollbar.css";
@import "~socicon/css/socicon.css";
@import "~animate.css";
@import "~@fortawesome/fontawesome-free/css/all.css";
@import "~line-awesome/dist/line-awesome/css/line-awesome.css";
@import "assets/plugins/flaticon/flaticon.css";
@import "assets/plugins/flaticon2/flaticon.css";
@import "assets/plugins/keenthemes-icons/font/ki.css";

// 主样式 scss
@import "assets/sass/style.vue";

//检查RTL css文档
//使用public/index.html中的rtl属性更新html
/*@import "assets/css/style.vue.rtl";*/
</style>

<script>
//布局设置
import {OVERRIDE_LAYOUT_CONFIG} from "@/core/services/store/config.module";

export default {
  name: "MetronicVue",
  mounted() {
    /**
     * 这是使用本地存储中保存的数据覆盖布局配置
     * 删除此选项以仅从静态json中使用配置(@/core/config/layout.config.json)
     */
    this.$store.dispatch(OVERRIDE_LAYOUT_CONFIG);
    //判断当前访问的设备
    if (this.isMobile() != null) {
      //手机端访问
      sessionStorage.setItem("qqLogin", "true");
    } else {
      //电脑端访问
      sessionStorage.setItem("qqLogin", "false");
    }
  },
  methods: {
    isMobile() {
      // 引用mobile-detect文件 获取当前访问的设备
      let MobileDetect = require('mobile-detect');
      return new MobileDetect(navigator.userAgent).mobile();
    }
  }
};
</script>
